import random
n = random.randint(0,100)
while True:
    count = 0
    while count < 3:
        user_guess = int(input("input you guess:"))
        if user_guess > n:
            print("try smaller")
        elif user_guess < n:
            print("try bigger")
        else:
            print("you got it")
            break #终止循环
        count +=1
    x = input("继续？y\n")
    if x == 'n' or x == 'N' :
        break
print(n)

